package work;

/**
 * @TODO
 * @Author xu
 * 2025/2/24
 */
import java.util.Scanner;
public class Day3_9 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        System.out.print("请输入一个整数：");
        int inputNumber = scanner.nextInt();
        String reversedNumber = reverseInteger(inputNumber);
        System.out.println("倒排后的整数是：" + reversedNumber);
    }
    public static String reverseInteger(int number) {
        StringBuilder reversed = new StringBuilder(String.valueOf(number));
        reversed.reverse();
        return reversed.toString();
    }



}
